#!/bin/sh

MY_IP=192.168.188.187
node=$1

ovn-nbctl create Logical_Router name=router_$node options:chassis=d87aafca-8c3e-4681-a9c1-02db4715d0f9
ovn-nbctl ls-add lswitch1_$node

ovn-nbctl lrp-add router_$node lr-ls1_$node 52:54:00:c1:68:51 10.0.0.1/24

ovn-nbctl lsp-add lswitch1_$node ls1-lr1_$node
ovn-nbctl lsp-set-type ls1-lr1_$node router
ovn-nbctl lsp-set-addresses ls1-lr1_$node 52:54:00:c1:68:51
ovn-nbctl lsp-set-options ls1-lr1_$node router-port=lr-ls1_$node



ovn-nbctl lsp-add lswitch1_$node ls1-vm1_$node
ovn-nbctl lsp-set-addresses ls1-vm1_$node "02:ac:10:ff:01:39 10.0.0.100"
ovn-nbctl lsp-set-port-security ls1-vm1_$node "02:ac:10:ff:01:39 10.0.0.100"


